﻿<!--
(c) Copyright Cory Plotts.
This source is subject to the Microsoft Public License (Ms-PL).
Please see http://go.microsoft.com/fwlink/?LinkID=131993 for details.
All other rights reserved.
-->
<Window
	x:Class="Snoop.ScreenshotDialog"
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:Snoop="clr-namespace:Snoop"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	mc:Ignorable="d"
	d:DataContext="{d:DesignData Source=/SampleData/ScreenshotVisualSample.xaml}"
	Title="Save Screenshot"
	Width="400"
	Height="400"
	Padding="10"
>
	<Window.Resources>
		<Style x:Key="PhotoFrameStyle" TargetType="{x:Type ContentControl}">
			<Style.Setters>
				<Setter Property="Template">
					<Setter.Value>
						<ControlTemplate TargetType="{x:Type ContentControl}">
							<Border
								Background="White"
								VerticalAlignment="Center"
								HorizontalAlignment="Center"
								Padding="8"
								Margin="10"
								RenderTransformOrigin="0.5, 0.5"
							>
								<Border.Effect>
									<DropShadowEffect BlurRadius="8" ShadowDepth="3" Opacity="0.6"/>
								</Border.Effect>

								<Border
									BorderThickness="1,1,0,0"
									BorderBrush="#55000000"
								>
									<Border
										BorderThickness="1,1,0,0"
										BorderBrush="White"
									>
										<Viewbox Stretch="Uniform">
											<Border
												Width="{Binding RenderSize.Width}"
												Height="{Binding RenderSize.Height}"
											>
												<Border.Background>
													<VisualBrush Visual="{Binding}" Stretch="Uniform"/>
												</Border.Background>
											</Border>
										</Viewbox>
									</Border>
								</Border>
							</Border>
						</ControlTemplate>
					</Setter.Value>
				</Setter>
			</Style.Setters>
		</Style>
	</Window.Resources>

	<Grid>
		<Grid.RowDefinitions>
			<RowDefinition Height="*"/>
			<RowDefinition Height="Auto"/>
		</Grid.RowDefinitions>

		<Grid>
			<Grid.RowDefinitions>
				<RowDefinition Height="*"/>
				<RowDefinition Height="Auto"/>
			</Grid.RowDefinitions>
			<ContentControl
				Style="{StaticResource PhotoFrameStyle}"
				DataContext="{Binding}"
			/>
			<TextBlock Grid.Row="1" TextAlignment="Center">Screenshot To Be Saved</TextBlock>
		</Grid>

		<Grid
			Grid.Row="1"
			Margin="0,15,0,0"
		>
			<StackPanel
				Orientation="Horizontal"
				HorizontalAlignment="Left"
				Margin="5,0,0,5"
			>
				<ComboBox
					x:Name="dpiBox"
					Grid.Column="1"
					Width="75"
					Margin="0,0,5,0"
					IsEditable="False"
				>
					<ComboBoxItem>
						<TextBlock Style="{x:Null}" Text="96"/>
					</ComboBoxItem>
					<ComboBoxItem>
						<TextBlock Style="{x:Null}" Text="150"/>
					</ComboBoxItem>
					<ComboBoxItem IsSelected="True">
						<TextBlock Style="{x:Null}" Text="300"/>
					</ComboBoxItem>
					<ComboBoxItem>
						<TextBlock Style="{x:Null}" Text="600"/>
					</ComboBoxItem>
				</ComboBox>
				<TextBlock Style="{x:Null}" VerticalAlignment="Center" Text="DPI"/>
			</StackPanel>

			<StackPanel
				Orientation="Horizontal"
				HorizontalAlignment="Right"
			>
				<Button
					Width="75"
					Margin="0,0,5,5"
					IsDefault="True"
					Command="{x:Static Snoop:ScreenshotDialog.SaveCommand}"
				>
					<TextBlock Style="{x:Null}" Text="Save"/>
				</Button>
				<Button
					Width="75"
					Margin="0,0,5,5"
					IsCancel="True"
					Command="{x:Static Snoop:ScreenshotDialog.CancelCommand}"
				>
					<TextBlock Style="{x:Null}" Text="Cancel"/>
				</Button>
			</StackPanel>
		</Grid>
	</Grid>
</Window>
